<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <title>邮件通知</title>
    <link href="css/style.css" rel="stylesheet">
    <script src="http://image.jianke.com/mobile/js/jquery.js"></script>
    <script src="javascripts/interactive.js"></script>
    <script src="javascripts/Language/<%= Language_js %>"></script>

</head>
<body>
<div class="wrap center" style="height:10rem;">
    <ul class="ul-email"></ul>
    <div class="addemail">
        <input id='v'  type="text" class="tjc" placeholder="添加电子邮件" value=""/>
        <span>×</span>
        <p id="addmail" onclick="addemail()">添加电子邮件</p>
    </div>
</div>
<div class="cens" style="height:10rem;"></div>
<div class="outbox">
    <div class="cen">
        <p id="delemail" style="margin-top: 0" onclick="deleteem()">移除此邮箱</p>
        <p class="p1s" style="margin-top: -0.2rem;border-top: 1px #E5E6E7 solid; " onclick="addemails()" >重新发送验证码</p>
    </div>
    <p class="p1">取消</p>
</div>
</body>
<script language="javascript">    <!--邮箱语言替换-->
    var Language = '<%= Language %>';
    if (Language == "ZH_ft"){
        $("#v").attr("placeholder","\u6DFB\u52A0\u96FB\u5B50\u90F5\u4EF6");
        $("#addmail").text("\u6DFB\u52A0\u96FB\u5B50\u90F5\u4EF6");
        $("#delemail").text("移除此郵箱");
        $(".p1s").text("重新發送驗證碼");
        $(".p1").text("取消");
    }else if ( Language== "ru"){
        $("#v").attr("placeholder","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0443\u044E \u043F\u043E\u0447\u0442\u0443");
        $("#addmail").text("\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0443\u044E \u043F\u043E\u0447\u0442\u0443");
        $("#delemail").text("Удалить этот почтовый ящик");
        $(".p1s").text("Повторить код");
        $(".p1").text("отменен");
    }else if (Language == "ko" ){
        $("#v").attr("placeholder","\uC774\uBA54\uC77C \uCD94\uAC00");
        $("#addmail").text("\uC774\uBA54\uC77C \uCD94\uAC00");
        $("#delemail").text("이 사서함을 제거");
        $(".p1s").text("다시 보내기 코드");
        $(".p1").text("취소");
    }else if (Language == "en" ){
        $("#v").attr("placeholder","Add email");
        $("#addmail").text("Add email");
        $("#delemail").text("Move this email");
        $(".p1s").text("To resend the verification code");
        $(".p1").text("cancel");
    }else if (Language == "de"){
        $("#v").attr("placeholder","E-Mail hinzufügen");
        $("#addmail").text("E-Mail hinzufügen");
        $("#delemail").text("Entfernen Sie diese Mailbox");
        $(".p1s").text("Code erneut senden");
        $(".p1").text("annulliert");
    }else if (Language == "es"){
        $("#v").attr("placeholder","Añadir correo electrónico");
        $("#addmail").text("Añadir correo electrónico");
        $("#delemail").text("Retire este buzón");
        $(".p1s").text("Código del reenvío");
        $(".p1").text("cancelado");
    }else if (Language== "it" ){
        $("#v").attr("placeholder","Aggiungi invia");
        $("#addmail").text("Aggiungi invia");
        $("#delemail").text("Rimuovere questa cassetta postale");
        $(".p1s").text("Codice Rispedisci");
        $(".p1").text("annullato");
    }else if (Language == "fr" ){
        $("#v").attr("placeholder","Ajouter email");
        $("#addmail").text("Ajouter email");
        $("#delemail").text("Retirer cette boîte aux lettres");
        $(".p1s").text("Renvoyer le code");
        $(".p1").text("annulé");
    }else if (Language == "ja"){
        $("#v").attr("placeholder","\u96FB\u5B50\u30E1\u30FC\u30EB\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002");
        $("#addmail").text("\u96FB\u5B50\u30E1\u30FC\u30EB\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002");
        $("#delemail").text("このメールボックスを削除します");
        $(".p1s").text("コードを再送信");
        $(".p1").text("キャンセル");
    }
</script>
<script type="text/javascript">      <!--追加邮件信息-->
    $(function() {
        if("<%= Relation_mail1%>" != ""){
            $(".ul-email").append('<li class="Relation_mail1" name="<%= Relation_mail1%>">'+'<a><%= Relation_mail1%></a>'+'<em>'+'</em>'+'<span>'+'</span>'+'</li>');
        }
        if("<%= Relation_mail2%>" != ""){
            $(".ul-email").append('<li class="Relation_mail2" name="<%= Relation_mail2%>">'+'<a><%= Relation_mail2%></a>'+'<em>'+'</em>'+'<span>'+'</span>'+'</li>');
        }
        if("<%= Relation_mail3%>" != ""){
            $(".ul-email").append('<li class="Relation_mail3" name="<%= Relation_mail3%>">'+'<a><%= Relation_mail3%></a>'+'<em>'+'</em>'+'<span>'+'</span>'+'</li>');
        }
        if("<%= Relation_mail4%>" != ""){
            $(".ul-email").append('<li class="Relation_mail4" name="<%= Relation_mail4%>">'+'<a><%= Relation_mail4%></a>'+'<em>'+'</em>'+'<span>'+'</span>'+'</li>');
        }
        if("<%= Relation_mail5%>" != ""){
            $(".ul-email").append('<li class="Relation_mail5" name="<%= Relation_mail5%>">'+'<a><%= Relation_mail5%></a>'+'<em>'+'</em>'+'<span>'+'</span>'+'</li>');
        }





        if("<%=verifi_mail%>" != ""){
            if("<%=verifi_mail%>"=="<%=verifi_mail%>"){
                $(".Relation_mail1").append("("+_email_bind_dyz+")");
            }else if(request("verifi")==request("param2")){
                $(".Relation_mail2").append("("+_email_bind_dyz+")");
            }else if(request("verifi")==request("param3")){
                $(".Relation_mail3").append("("+_email_bind_dyz+")");
            }else if(request("verifi")==request("param4")){
                $(".Relation_mail4").append("("+_email_bind_dyz+")");
            }else if(request("verifi")==request("param5")){
                $(".Relation_mail5").append("("+_email_bind_dyz+")");
            }
        }




        $(".ul-email li").click(function() {
            if($(this).children().text() == "异常"){
                $(".outbox2").slideDown();
                b = $(this).attr("class");
                $(".cens").show();
            }else if($(this).hasClass("email")){
                swal({
                    title: "不能删除该email邮箱！",
                })
            }else{             //****
                $(".outbox").slideDown();
                b=$(this).attr("class");
                $(".cens").show();
            }
        });
        $("#addmail").click(function(){
            var email=$("#v").val();
            var auth=$("#auth").val();
            var oemid=$("#oemid").val();
            var language=$("#language").val();
            var alert1=$("#alert1").val();
            var alert2=$("#alert2").val();
            var alert3=$("#alert3").val();
            var alert4=$("#alert4").val();
            var alert5=$("#alert5").val();
            var alert6=$("#alert6").val();
            var alert7=$("#alert7").val();
            var rela=1;
            if($('ul>li').length >= 5){
                $('.addemail input').attr('disabled','false');
                $("#addmail,.addemail span").hide();
                $('.addemail input').val(alert1);
            } else {
                $.post("bindEmail.do",{email:email,pre:rela,authkey:auth,oemid:oemid,language:language},function(result){
                    if(result==500){
                        window.location.href='admin/error/500';
                    }else if(result==111){
                        $('.numalert').show().children('p').tealertxt(alert2);
                    }else if(result==113){
                        $('.numalert').show().children('p').text(alert3);
                    }else if(result==112){
                        $('.numalert').show().children('p').text(alert4);
                    }else if(result==103){
                        $('.numalert').show().children('p').text(alert5);
                    }else if(result==101){
                        $('.numalert').show().children('p').text(alert6);
                    }else if(result>0){
                        setTimeout(window.location.href='getEmail.do?authkey='+auth+'&oemid='+oemid+'&language='+language);
                    }else{
                        $('.numalert').show().children('p').text(alert7);
                    }
                });
                $(this).hide();
                $('.addemail input').val('');
                $(".addemail span").hide();
            }
        });
    });
</script>
</html>